package com.ssoserver.utils;

import com.google.common.collect.Maps;
import lombok.*;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@ToString
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class JsonAndView<T> implements Serializable {
    private Integer status;
    private String msg;
    private Map content;
    public static JsonAndView success(List list) {
        Map<String, Object> map = Maps.newHashMap();
        map.put("list", list);
        JsonAndView<Object> build = JsonAndView.builder().status(10).msg("成功").content(map).build();
        return build;
    }
}
